home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / mcu / headers.arc / 68HC05P1.05H < prev    next >
Text File  |  1989-09-21  |  5KB  |  105 lines

  1. /*
  2.                      MC68HC05P1  HEADER
  3.  
  4. WRITTEN:    9/21/89
  5. REVISION:   0.9
  6. USE FOR:    MC68HC05P1
  7.  
  8. The following header describes the memory, vectors, peripherals and special
  9. instructions for the MC68HC05P1 microprocessor.  The information is taken from
  10. the Motorola Data Sheet and is assumed to be correct.  It is specifically
  11. designed to work with the Byte Craft C6805 Compiler, and is offered free for
  12. your convenience.
  13.  
  14. I have taken most of the mnemonics directly from the Motorola literature with
  15. the exception of those labels which could cause confusion with the compiler
  16. or the assembler.  Please check all labels before using.
  17.  
  18. If you discover any errors or omissions, please communicate them to me through
  19. the FREEWARE bulletin board or directly at the Motorola Detroit Sales Office
  20. (313) 347-6800 (Before 10/15/89: 261-6200).
  21.  
  22. Mike Pauwels,  Senior FAE
  23.  
  24. ******************************************************************************
  25. *                                                                            *
  26. * This product is distributed without charge to users via the MOTOROLA       *
  27. * FREEWARE Bulletin Board.  The product is provided "as is" without warranty *
  28. * of any kind either expressed or implied, including, but not limited to any *
  29. * warranties of merchantability and fitness for a particular purpose.  All   *
  30. * risks of using this product including the entire costs of any necessary    *
  31. * remedies are those of the user and MOTOROLA assumes no liability of any    *
  32. * kind.                                                                      *
  33. *                                                                            *
  34. ******************************************************************************
  35.  
  36. */
  37.  
  38.  
  39. /*                   MEMORY MAP                                              */
  40.  
  41. #pragma memory ROMPROG  [2048]  @ 0x0100 ;
  42. #pragma memory ROMPAGE0 [48]    @ 0x0020 ;
  43. #pragma memory RAMPAGE0 [128]   @ 0x0080 ;
  44.  
  45.  
  46. /*                   INTERRUPT VECTORS                                       */
  47.  
  48. #pragma vector __RESET @ 0x1ffe ;
  49. #pragma vector SWI     @ 0x1ffc ;
  50. #pragma vector IRQ     @ 0x1ffa ;
  51. #pragma vector TIMER   @ 0x1ff8 ;
  52.  
  53.  
  54. /*                   INPUT/ OUTPUT PORTS                                     */
  55.  
  56. #pragma portrw porta   @ 0x00;  /* General Purpose I/O Port                  */
  57. #define bit0 0
  58. #define bit1 1
  59. #define bit2 2
  60. #define bit3 3
  61. #define bit4 4
  62. #define bit5 5
  63. #define bit6 6
  64. #define bit7 7
  65.  
  66. #pragma portrw portb   @ 0x01;  /* i/o, i/o, i/o, 0; 0,0,0,0                 */
  67. #pragma portrw portc   @ 0x02;  /* General Purpose I/O Port                  */
  68. #pragma portr  portd   @ 0x03;  /* TCAP, PD5, 0, 0,; 0, 0, 0, 0              */
  69. #define tcap 7                  /* Timer Input Capture                       */
  70.  
  71. #pragma portrw ddra    @ 0x04;  /* Data direction, Port A                    */
  72. #pragma portrw ddrb    @ 0x05;  /* Data direction, Port B                    */
  73. #pragma portrw ddrc    @ 0x06;  /* Data direction, Port C                    */
  74.  
  75.  
  76. /*                    TIMER REGISTERS                                        */
  77.  
  78. #pragma portrw tcr     @ 0x12;  /* ICIE,OCIE,TOIE,0;0,0,IEGE,OLVL            */
  79. #define icie   7                /* Input Capture Interrupt Enable            */
  80. #define ocie   6                /* Output Compare Interrupt Enable           */
  81. #define toie   5                /* Timer Overflow Interrupt Enable           */
  82. #define iege   1                /* Input Edge                                */
  83. #define olvl   0                /* Output Level                              */
  84.  
  85. #pragma portr  tsr     @ 0x13;  /* ICF,OCF,TOF,0; 0,0,0,0                    */
  86. #define icf    7                /* Input Capture Flag                        */
  87. #define ocf    6                /* Output Compare Flag                       */
  88. #define tof    5                /* Timer Overflow Flag                       */
  89.  
  90. #pragma portr  ichr    @ 0x14;  /* Input Capture Reg High Byte               */
  91. #pragma portr  iclr    @ 0x15;  /* Input Capture Reg Low Byte                */
  92. #pragma portrw ochr    @ 0x16;  /* Output Compare Reg High Byte              */
  93. #pragma portrw oclr    @ 0x17;  /* Output Compare Reg Low Byte               */
  94. #pragma portr  tchr    @ 0x18;  /* Timer Counter Register High Byte          */
  95. #pragma portr  tclr    @ 0x19;  /* Timer Counter Register Low Byte           */
  96. #pragma portr  achr    @ 0x1A;  /* Alternate Count Reg High Byte             */
  97. #pragma portr  aclr    @ 0x1B;  /* Alternate Count Reg Low Byte              */
  98.  
  99.  
  100. /*                   MC68HC05 INSTRUCTIONS                                   */
  101.  
  102. #pragma has STOP ;
  103. #pragma has WAIT ;
  104. #pragma has MUL ;
  105.